<?php if (!defined('THINK_PATH')) exit();?>
<!DOCTYPE HTML>
<html dir="ltr" lang="en-US">
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

	<title>Web 2.0 Login Form by Azmind.com</title>

	
	<link rel="stylesheet" href="/TPproject/project/Public/Admin/Css/style.css" type="text/css" />


	

		
		<script type="text/javascript" src="/TPproject/project/Public/Admin/Js/jquery-1.8.1.min.js"></script>
		<script type="text/javascript" src="/TPproject/project/Public/Admin/Js/selectivizr.js"></script>
		<script type="text/javascript" src="/TPproject/project/Public/Admin/Js/layer.js"></script>
		<noscript><link rel="stylesheet" href="/TPproject/project/Public/Admin/Css/fallback.css" /></noscript>
	

	</head>

	<body>
		<div id="container">
			<form action="" method="post" enctype="multipart/form-data" id="login_on">
				<div class="login">登录</div>
				<div class="username-text">账号:</div>
				<div class="password-text">密码:</div>
				<div class="username-field">
					<input type="text" name="username" id="user" value="" />
				</div>
				<div class="password-field">
					<input type="password" name="password" value="" id="passwd" />
				</div>
				<input type="checkbox" name="remember-me" id="remember-me" /><label for="remember-me">记住密码</label>
				
				<div class="forgot-usr-pwd"><div class="password-field" style="width: 80px;position: relative;left:-10px;top:-9px">
					<input type="text" name="verify" value="" id="verify" style="width: 80px;"/>
				</div><img width="100" height="40" src="<?php echo U('Admin/Manage/verify');?>" style="cursor:pointer;" onclick="this.src=this.src" alt="验证码" id="ver_img"/></div>
				<input type="button" name="submit" id="submit" value="登录" style="cursor: pointer;" />
			</form>
		</div>
		<div id="footer">
			Web 2.0 Login More Templates <a href="http://www.cssmoban.com/" target="_blank" title="模板之家">模板之家</a>
		</div>
	</body>
</html>
	<script type="text/javascript" >
		$('#user').blur(function(){

		
			
		})
		function clickEnter(){
			$('#submit').click();
		}
		$('#submit').click(function(){

			var user = $('#user').val();
			var pwd = $('#passwd').val();
			var verify = $('#verify').val();

			if(user == ''){
				layer.msg('账号不可为空',{time:1500});
				return false;
			}else if(pwd == ''){
				layer.msg('密码不可为空',{time:1500});
				return false;
			}else{
				$.post("<?php echo U('login');?>",{username : user, password : pwd, verify : verify},function(data){

					if(data.code==1){
						// layer.alert(data.info,{time:2000});
						location.href = "<?php echo U('Index/index');?>";
					}else{
						layer.msg(data.info,{time:1000});
						return false;
						
					}
				})
				$("#ver_img").click();
				return false;
			}


			
		})
	</script>